<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="js/jquery-ui.css" />
    <link rel="stylesheet" href="css/adminIndex.css" />
	<style type="text/css">
		body{
			
		}
		h1{
			text-align:center;
		}
		.crm_uesr{
			position: absolute;
			left: 290px;
			top:71px;
			width:85%;
			height:89%;

		}
		
		div{
			cursor: pointer;
		}
		.b{
			display: block;
		}
		
		.welcome-container {
            position: fixed;
            top: 50%;
            left: 57%;
            transform: translate(-50%, -50%);
            text-align: center;
            background-color: #fff;
            padding: 60px;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            max-width: 90%;
            width: 800px;
        }
        h1 {
            font-size: 3em;
            color: #007bff;
            margin-bottom: 20px;
        }
        p {
            font-size: 1.5em;
        }
	</style>
  </head>

  <body>
    <!-- 创建一个包含全部的总div -->
    <div class="adminAllDiv">

      <!-- 页面的顶栏 -->
      <header class="adminHeader">
  		<h1>幻视电影后台管理系统</h1>
        <!-- 用户名显示以及退出登录页面 -->
        <span class="adminHeaderName">
            
            <!-- 退出页面链接 -->
             <a href="CRM/admin_login.jsp" class="adminHeaderExit">退出</a>
        </span>

      </header>


      <!-- 页面侧栏 -->
      <nav class="adminNav">

        <!-- 管理员信息展示页面 -->
        <div class="adminNavDivShow">
            <!-- 管理员头像显示 -->
             <img src="images/admin.png" alt="" class="adminNavAdminImg">
             <!-- 管理员账号 -->
             <span class="adminNavAdminName">账户：${Admin.adminName }</span>
             <!-- 管理员密码 -->
             <span class="adminNavAdminPass">密码：${Admin.adminPass }</span>
        </div>

        <!-- 各级菜单栏 -->
        <div id="adminNavMenu" class="adminNavMenu">           
            <h3>&nbsp;<a href="#">管理菜单</a></h3>
            <div>
                <p><a  name="queryAllServlet" class="user">用户管理</a></p>
                <p><a  name="CRM/crm_movie.jsp" class="user">电影管理</a></p>
                <p><a  name="admin_movieServlet" class="user">电影查看</a></p>
                <p><a  name="queryAllOrderServlet" class="user">订单管理</a></p>
                <p><a  name="queryAllAdminServlet" class="user">管理员管理</a></p>
            </div>
            
        </div>
      </nav>
      <footer class="adminFooter"></footer>
      <article></article>
      <button></button>
		<div class="crm_uesr">
			<div class="welcome-container">
        	<h1 class="b">欢迎进入电影管理系统</h1>
        	<p class="b">开始管理您的电影信息。</p>
    </div>
		</div>
    </div>
   
  </body>
  <script src="js/jquery-3.7.1.js"></script>
  <script src="js/jquery-ui.js"></script>
  <script src="js/adminIndexjs"></script>
  <script>
    //初始化函数
    $(function () {
      //调用更新界面方法
      updateInterface();
    });

    //更新总界面函数
    function updateInterface(){
      //设置Alldiv
      setAdminAllDivSize();
      //设置侧栏
      $(".adminNav").width($(".adminAllDiv").width() * 0.15);
      $(".adminNav").height($(".adminAllDiv").height());
      setAdminNavSize();
      //设置顶栏
      setAdminHeaderSize();
      //设置底栏大小
      setAdminFooterSize();
      //循环设置时间
      getDate();
      //隐藏顶栏的显示按钮
      $(".adminHeaderNavShow").hide();
    }

    //隐藏侧边栏函数
    function hideNav(){
      //设置侧边栏大小
      //侧边栏设置
      $(".adminNav").width("0px");
      $(".adminNav").height("0px");
      //设置Alldiv
      setAdminAllDivSize();
      //设置顶栏
      setAdminHeaderSize();
      //设置底栏大小
      setAdminFooterSize();
      //循环设置时间
      getDate();
      $(".adminHeaderNavShow").show();
    }

    //浏览器窗口变化调用函数
    window.addEventListener('resize', function(event){
      updateInterface();
    });

    // 使All自适应大小
    function setAdminAllDivSize() {
      $(".adminAllDiv").width($(window).width());
      $(".adminAllDiv").height($(window).height());
    }

    //设置侧栏大小
    function setAdminNavSize() {
      //侧边栏设置
      $(".adminNav").width($(".adminAllDiv").width() * 0.15);
      $(".adminNav").height($(".adminAllDiv").height());
      //管理员信息展示页面设置
      $(".adminNavDivShow").width($(".adminNav").width()*0.9);
      $(".adminNavDivShow").height($(".adminNav").height()*0.15);
      $(".adminNavDivShow").css("left",$(".adminNav").width()*0.05);
      $(".adminNavDivShow").css("top",$(".adminNav").height()*0.02);
      $(".adminNavAdminImg").width($(".adminNavDivShow").width()*0.35);
      $(".adminNavAdminImg").height($(".adminNavDivShow").width()*0.35);
      $(".adminNavAdminImg").css("left",$(".adminNavDivShow").width()*0.05);
      $(".adminNavAdminImg").css("top",$(".adminNavDivShow").width()*0.05);
      $(".adminNavAdminName").css("left",$(".adminNavDivShow").width()*0.41);
      $(".adminNavAdminName").css("top",$(".adminNavDivShow").height()*0.2);
      $(".adminNavAdminPass").css("left",$(".adminNavDivShow").width()*0.41);
      $(".adminNavAdminPass").css("top",$(".adminNavDivShow").height()*0.5);
      //各级菜单栏设置
      $(".adminNavMenu").width($(".adminNav").width()*0.9);
      $(".adminNavMenu").height($(".adminNav").height()*0.55);
      $(".adminNavMenu").css("left",$(".adminNav").width()*0.05);
      $(".adminNavMenu").css("top",$(".adminNav").height()*0.04+$(".adminNavDivShow").height());
      //隐藏按钮设置
      $(".adminNavHide").width($(".adminNav").width()*0.15);
      $(".adminNavHide").height($(".adminNav").width()*0.15);
    }
    //设置侧栏的显示隐藏

    //设置顶栏内容,宽度为All减去侧栏
    function setAdminHeaderSize() {
      //顶栏设置
      $(".adminHeader").width(
      $(".adminAllDiv").width() - $(".adminNav").width());
      $(".adminHeader").height($(".adminAllDiv").height() * 0.08);
      $(".adminHeader").css("left", $(".adminNav").width());
      //顶栏内Logo设置
      $(".adminHeaderLogo").width($(".adminHeader").width()*0.15);
      $(".adminHeaderLogo").height($(".adminHeader").height());
      $(".adminHeaderLogo>img").width($(".adminHeaderLogo").width());
      $(".adminHeaderLogo>img").height($(".adminHeaderLogo").height());
      //顶栏时间设置
      $(".adminHeaderDate").css("left",$(".adminHeader").width()*0.01);
      $(".adminHeaderDate").css("top",$(".adminHeader").height()*0.2);
      //顶栏退出设置
      $(".adminHeaderName").css("left",$(".adminHeader").width()*0.94);
      $(".adminHeaderName").css("top",$(".adminHeader").height()*0.2);
    }

    //设置底栏大小
    function setAdminFooterSize() {
      $(".adminFooter").width(
      $(".adminAllDiv").width() - $(".adminNav").width());
      $(".adminFooter").height($(".adminAllDiv").height() * 0.03);
      $(".adminFooter").css("left", $(".adminNav").width());
      $(".adminFooter").css("top",$(".adminAllDiv").height() - $(".adminFooter").height());
    }

    //多级菜单栏方法
    $( function() {
        $( "#adminNavMenu" ).accordion({
            collapsible: true
        });
    } );
    //隐藏按钮方法，仅能隐藏
    $( ".adminNavHide" ).click(function() {
      $( ".adminNav" ).hide( "slide");
      //调用隐藏侧边栏函数
      hideNav();
    });
    //显示方法，仅能显示
    //$( ".adminHeaderNavShow" ).click(function() {
       // $( ".adminNav" ).show("slide");
        //调用更新页面方法
       // updateInterface();
    //});
    
    $(".user").click(function(){
    	//alert(1111)
    	$(".b").hide();
    	$(".welcome-container").hide();
    	$("iframe").remove();
    	var a=$("<iframe id='ir' src='' width='100%' height='100%' scrolling='' frameborder='no'></iframe>")
    	var url=$(this).attr("name");
    	//alert(a)
    	//alert(url)
    	a.attr("src",url);
    	$(".crm_uesr").append(a);
    	//alert($("#ir").attr("src"))
    })
    
    
  </script>
</html>                                                                             
                                                                                                                                          